#include"LTList.h"

bool cmp(LTdatetype a, LTdatetype b)
{
	return a == b;
}

LTtest1()
{
	LTNode* head = NULL;
	head = LTCreat();
	LTPushBack(head, 1);
	LTPushBack(head, 2);
	LTPrint(head);
	LTPopBack(head);
	LTPrint(head);
	LTDestory(head);
	head = NULL;
}

LTtest2()
{
	LTNode* head = NULL;
	head = LTCreat();
	LTPushFront(head, 1);
	LTPushFront(head, 2);
	LTPushFront(head, 3);
	LTPushFront(head, 4);
	LTPrint(head);
	LTPopFront(head);
	LTPrint(head);
	LTNode* find = LTFind(head, 2, cmp);
	LTInsert(find, 10);
	LTPrint(head);
	find = LTFind(head, 2, cmp);
	LTErease(find);
	LTPrint(head);
	LTDestory(head);
	head = NULL;
}

int main()
{
	//LTtest1();
	LTtest2();
	return 0;
}